package com.jyxd.web.dao.basic;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jyxd.web.data.basic.BedBindDevice;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author baomidou
 * @since 2022-09-23
 */
public interface BedBindDeviceMapper extends BaseMapper<BedBindDevice> {

    BedBindDevice selectOneByBedCodeAndTenantId(@Param("bedCode") String bedCode, @Param("tenantId")String tenantId, @Param("dataTime")Date dataTime);

    int unbindByBedCodeOrDeviceId(@Param("bedCode") String bedCode, @Param("deviceId") String deviceId,
                                  @Param("unbindTime") Date unbindTime,@Param("deviceType") int deviceType,
                                  @Param("userId")String userId);
}
